package com.jadeen.enums;

import lombok.Getter;

/**
 *
 *
 */
@Getter
public enum PlantTypeEnum {

    BAIDU("baidu","百度"),
    KUAKE("quark","夸克"),
    XUNLEI("xunlei","迅雷");

    public String code;
    public String desc;

    PlantTypeEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static PlantTypeEnum getByCode(String codeVal){
        for(PlantTypeEnum resultCodeEnum : PlantTypeEnum.values()){
            if(resultCodeEnum.code.equals(codeVal)){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
